<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>商品基本信息管理-后台管理系统</title>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/admin/css/css.css" />
<script type="text/javascript" src="${pageContext.request.contextPath}/admin/js/jquery.min.js"></script>
<!-- <script type="text/javascript" src="js/page.js" ></script> -->
</head>

<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="${pageContext.request.contextPath}/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;-</span>&nbsp;商品基本信息管理
			</div>
		</div>

		<div class="page">
			<!-- user页面样式 -->
			<div class="connoisseur">
				<div class="conform">
					<form action="${pageContext.request.contextPath}/book?method=addPromotion" method="post">
						<div class="cfD">
							<input class="userinput" type="text" name="productNum" placeholder="输入书的产品编号" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="name" placeholder="输入书的名字" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="price" placeholder="输入书的价格" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="discountPrice" placeholder="输入书的折扣价" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="img" placeholder="输入书的图片" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="discount" placeholder="输入书的折扣" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="status" placeholder="输入书的审核状态" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="type" placeholder="输入书籍类型" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="fitGrade" placeholder="输入本书适合的年级" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="author" placeholder="输入书的作者" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="publishHouse" placeholder="输入书的出版社" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="publishDate" placeholder="输入书的出版时间" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="integral" placeholder="输入购买本书后可得积分" />&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;
							<input class="userinput" type="text" name="uploadTime" placeholder="输入书的上传时间" />
							<input class="userbtn" type="submit" value="添加"/>
						</div>
					</form>
				</div>
				<script>
					if (${requestScope.addBook == 1}) {
					    alert("添加成功！")
					}
				</script>
				<!-- user 表格 显示 -->
				<%--<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="66px" class="tdColor tdC">产品编号</td>
							<td width="435px" class="tdColor">名字</td>
							<td width="400px" class="tdColor">价格</td>
							<td width="630px" class="tdColor">折扣价</td>
							<td width="130px" class="tdColor">图片</td>
							<td width="66px" class="tdColor tdC">折扣</td>
							<td width="435px" class="tdColor">审核状态</td>
							<td width="400px" class="tdColor">类型</td>
							<td width="630px" class="tdColor">适合的年级</td>
							<td width="130px" class="tdColor">作者</td>
							<td width="435px" class="tdColor">出版社</td>
							<td width="400px" class="tdColor">出版时间</td>
							<td width="630px" class="tdColor">可得积分</td>
							<td width="130px" class="tdColor">上传时间</td>
							<td width="130px" class="tdColor">操作</td>
						</tr>
						<c:forEach var="bookInfo" items="${sessionScope.bookInfos}">
							<tr>
								<td style="width:265px;">${bookInfo.id}</td>
								<td>${bookInfo.productNum}</td>
								<td>${bookInfo.name}</td>
								<td>${bookInfo.price}</td>
								<td>${bookInfo.discountPrice}</td>
								<td><img src="${bookInfo.img}" width="25px" height="25px"/></td>
								<td>${bookInfo.discount}</td>
								<td>${bookInfo.status}</td>
								<td>${bookInfo.type}</td>
								<td>${bookInfo.fitGrade}</td>
								<td>${bookInfo.author}</td>
								<td>${bookInfo.publishHouse}</td>
								<td>${bookInfo.publishDate}</td>
								<td>${bookInfo.integral}</td>
								<td>${bookInfo.uploadTime}</td>
								<td><a href="connoisseuradd.html"><img class="operation" src="img/update.png"></a>
									<img class="operation delban" src="img/delete.png">
								</td>
							</tr>

						</c:forEach>
					</table>

					<div class="paging">
                        <table>
                            <tr>
								<c:if test="${sessionScope.currentPage > 1}">
									<a href="${pageContext.request.contextPath }/book?method=findByPage&pageIndex=${sessionScope.currentPage-1}">上一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage <= 1}">
								<a style="background-color:gray;">上一页</a>
								</c:if>

								<c:forEach begin="1" end="${sessionScope.bookPage / 7 + 1}" varStatus="v">
									<a href="${pageContext.request.contextPath }/book?method=findByPage&pageIndex=${v.count}">${v.count} &nbsp;</a>
								</c:forEach>

								<c:if test="${sessionScope.currentPage < sessionScope.bookPage / 7 }">
									<a href="${pageContext.request.contextPath }/book?method=findByPage&pageIndex=${sessionScope.currentPage+1}">下一页</a>
								</c:if>
								<c:if test="${sessionScope.currentPage >= sessionScope.bookPage / 7}">
								<a style="background-color:gray;">下一页</a>
								</c:if>
                            </tr>
                        </table>
                    </div>
				</div>--%>
				<!-- user 表格 显示 end-->
			</div>
			<!-- user页面样式end -->
		</div>

	</div>


	<!-- 删除弹出框 -->
	<%--<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="#" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>--%>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
</html>